<?php

namespace app\warehouse\controller;
use app\common\controller\PCBase;
use app\common\library\Upload;
use app\common\controller\DBase;
use app\warehouse\logic\DetailedListLogic;
use Throwable;
use  think\App;
class DetailedList extends PCBase
{

    /**
     * @desc   仓库清单--spu
     * @author zhangheng
     * @date   2024-12-11
     */
    public function getDetailedList(){
        $params     = $this->request->post();
        return  (new DetailedListLogic())->getDetailedList($params);
    }

    /**
     * @desc   仓库清单修改
     * @author zhangheng
     * @date   2024-12-11
     */
    public function edit(){
        $params     = $this->request->post();
        return  (new DetailedListLogic())->edit($params);
    }

    /**
     * @desc   仓库清单详情
     * @author zhangheng
     * @date   2024-12-11
     */
    public function find(){
        $params     = $this->request->post();
        return  (new DetailedListLogic())->find($params);
    }
    /**
     * @desc   仓库清单导出
     * @author zhangheng
     * @date   2024-12-11
     */
    public function export(){
        $params     = $this->request->post();
        return  (new DetailedListLogic())->export($params);
    }
    /**
     * @desc   仓库清单详情
     * @author zhangheng
     * @date   2024-12-11
     */
    public function import(){
        $file       = $this->request->file('file');
        $res        = (new Upload($file))->upload(null, $this->getAdminId()); 
        return  (new DetailedListLogic())->import($res['url']);
    }

}